#ifndef NETIM_H
#define NETIM_H

#include <QtGui/QMainWindow>
#include <QTimer>
#include <QSystemTrayIcon>
#include <QMenu>
#include "SettingManager.h"
#include "ui_netim.h"
#include "scanner.h"
#include "tcppubliccontroller.h"

class netim : public QMainWindow
{
    Q_OBJECT
public:
    static const int step_time = 5000;
    static int mode;
    netim(SettingManager *settings, QWidget *parent = 0);
    ~netim();
private slots:
    void on_contactList_doubleClicked(QModelIndex index);
    void on_visibilityStatus_currentIndexChanged(int index);
    void on_actionExit_activated();
    void ch_visible();
    void ch_amigo();
    void ch_invisible();
    void update_public_scanner();
    void tray_activated(QSystemTrayIcon::ActivationReason);
private:
    QSystemTrayIcon trayIcon;
    QMenu contextMenu;
    SettingManager *settings;
    QTimer scanner_updater;
    ContactListManager *contactlistmanager;
    scanner *public_scanner;
    TcpPublicController *tcppubliccontroller;
    Ui::netimClass ui;
};

#endif // NETIM_H
